<?php

/*
 * 加载辅助函数
 */
require 'helper.php';

/*
 * 注册配置
 */
$config = \fty\Config\Register::getInstance('../config/');

/*
 * 加载路由
 */
$route = \fty\Routing\Route::getInstance();

/*
 * 调用控制器分发并处理请求
 */
$callClass  = $route->getCallControllerName();
$controller = new $callClass();

//var_dump($_SERVER);
//var_dump($route->getCallControllerName());
//var_dump($route->getCallControllerParam());
//var_dump($route->getCallControllerMethod());
echo $controller->handle(
    $route->getCallControllerParam(),
    $route->getRequestMethod()
);
